Tables [dbo].[ActionPlan]
Properties
PropertyValue
Created10:31:12 AM Tuesday, March 02, 2010
Last Modified1:20:13 PM Thursday, February 23, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ActionPlan: ActionPlanKeyActionPlanKeyuniqueidentifier16
No
(newid())
Namenvarchar(50)100
No
Descriptionnvarchar(200)400
Yes
ActionManifestntextmax
Yes
Foreign Keys FK_ActionPlan_UserMain_UpdatedBy: [dbo].[UserMain].UpdatedByUserKeyIndexes IX_ActionPlan_UpdatedByUserKey: UpdatedByUserKeyUpdatedByUserKeyuniqueidentifier16
No
UpdatedOndatetime8
No
Foreign Keys FK_ActionPlan_OpportunityType: [dbo].[OpportunityType].OpportunityTypeKeyIndexes IX_ActionPlan_OpportunityTypeKey: OpportunityTypeKeyOpportunityTypeKeyuniqueidentifier16
Yes
Foreign Keys FK_ActionPlan_UserMain_CreatedBy: [dbo].[UserMain].CreatedByUserKeyIndexes IX_ActionPlan_CreatedByUserKey: CreatedByUserKeyCreatedByUserKeyuniqueidentifier16
No
CreatedOndatetime8
No
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_ActionPlan: ActionPlanKeyPK_ActionPlanActionPlanKey
Yes
IX_ActionPlan_CreatedByUserKeyCreatedByUserKey
IX_ActionPlan_OpportunityTypeKeyOpportunityTypeKey
IX_ActionPlan_UpdatedByUserKeyUpdatedByUserKey
Foreign Keys Foreign Keys
NameColumns
FK_ActionPlan_OpportunityTypeOpportunityTypeKey->[dbo].[OpportunityType].[OpportunityTypeKey]
FK_ActionPlan_UserMain_CreatedByCreatedByUserKey->[dbo].[UserMain].[UserKey]
FK_ActionPlan_UserMain_UpdatedByUpdatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[ActionPlan]
(
[ActionPlanKey] [uniqueidentifier] NOT NULL CONSTRAINT [DF_ActionPlan_ActionPlanKey] DEFAULT (newid()),
[Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ActionManifest] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[UpdatedOn] [datetime] NOT NULL,
[OpportunityTypeKey] [uniqueidentifier] NULL,
[CreatedByUserKey] [uniqueidentifier] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
ALTER TABLE [dbo].[ActionPlan] ADD CONSTRAINT [PK_ActionPlan] PRIMARY KEY CLUSTERED ([ActionPlanKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ActionPlan_CreatedByUserKey] ON [dbo].[ActionPlan] ([CreatedByUserKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ActionPlan_OpportunityTypeKey] ON [dbo].[ActionPlan] ([OpportunityTypeKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ActionPlan_UpdatedByUserKey] ON [dbo].[ActionPlan] ([UpdatedByUserKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ActionPlan] ADD CONSTRAINT [FK_ActionPlan_OpportunityType] FOREIGN KEY ([OpportunityTypeKey]) REFERENCES [dbo].[OpportunityType] ([OpportunityTypeKey])
GO
ALTER TABLE [dbo].[ActionPlan] ADD CONSTRAINT [FK_ActionPlan_UserMain_CreatedBy] FOREIGN KEY ([CreatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
ALTER TABLE [dbo].[ActionPlan] ADD CONSTRAINT [FK_ActionPlan_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses
Used By